package org.peoples.utils {
	
	import mx.core.UIComponent;
	import mx.core.IUIComponent;
	
	public class ContentManager {
		
		private var container:UIComponent;
		
		public function ContentManager(container:UIComponent) {
			
			this.container = container;
			
		}
		
		private function removeContent():void {
			var len:int = container.numChildren;
			for (var i:int = 0; i < len; i++) {
				container.removeChildAt(i);
			}
		}
		
		public function swapContent(content:UIComponent):void {
			removeContent();
			container.addChild(content);
		}
		
	}
	
}